<?php
$code = <<<EOF
package code

import "git.inke.cn/BackendPlatform/golang/ecode"

var (
	SuccessCode      = 0
	ServerErrorCode  = 500
	DbNoDataErrorCode  = 501
	InvalidParamCode = 10000
)

var (
	Success     = ecode.New(SuccessCode)
	InvalidParam  = ecode.New(InvalidParamCode)
	ServerError = ecode.New(ServerErrorCode)
	DbNoDataError = ecode.New(DbNoDataErrorCode)
)

func init() {
	ecode.Register(map[int]string{
		InvalidParamCode: "参数错误",
		ServerErrorCode:  "系统开小差了，请稍后重试",
		SuccessCode:      "成功",
		DbNoDataErrorCode:      "数据不存在",
	})
}

EOF;
?>
<?= $code?>
